var t = getApp(), e = t.getNetAddresss("plugin.store-projects.frontend.project.get-list-by-goods-id"), o = require("../../../../../mybehaviors/location/location"), a = null;

Component({
    behaviors: [ o ],
    properties: {
        goodsId: {
            type: Number,
            value: null
        }
    },
    lifetimes: {
        attached: function() {
            var t = this;
            this._getLocation(function(e, o) {
                a = {
                    point: o
                }, t.getProjects();
            });
        }
    },
    data: {
        projects: [],
        ProjectNameLang: "项目"
    },
    methods: {
        getProjects: function() {
            var o = this, s = t.qqMapTransBMap(parseFloat(a.point.lng), parseFloat(a.point.lat));
            t._getNetWork({
                url: e,
                data: {
                    goods_id: this.data.goodsId,
                    lng: s.lng,
                    lat: s.lat
                },
                success: function(t) {
                    var e = t.data.data;
                    o.setData({
                        projects: e
                    });
                }
            });
        },
        getProjectNameLang: function() {
            var t, e, o = wx.getStorageSync("yz_basic_info");
            null !== (t = o.lang) && void 0 !== t && null !== (e = t.store_projects) && void 0 !== e && e.project && this.setData({
                ProjectNameLang: o.lang.store_projects.project
            });
        }
    }
});